package com.cash.loan.modular.cash.transfer;

import com.alibaba.fastjson.JSONArray;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * @author Administrator
 * @Date 2018-07-11 17:16
 */
public class NewProductDto {

    @NotBlank(message = "产品名不能为空")
    private String productName;

    @DecimalMin(value = "0",message = "最小额度不能小于0")
    private BigDecimal minLoanAmount;

    @DecimalMin(value = "1",message = "最大额度不嫩小于1")
    private BigDecimal maxLoanAmount;

    @Min(value = 1,message = "最小期限不能小于1")
    private Long minLoanTerm;

    @Min(value = 1,message = "最大期限不能小于1")
    private Long maxLoanTerm;

    @NotEmpty(message = "日利率不能为空")
    private Float dayLoanRate;

    private String productSellPoint;

    @NotBlank(message = "产品展示地址不能为空")
    private String productH5Url;

    @NotBlank(message = "产品图标地址不能为空")
    private String productIconUrl;

    @NotEmpty(message = "申请流程不能为空")
    private JSONArray applyFlowList;

    private String applyCondition;

    private String auditDetail;

    private String productIntroduce;

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public BigDecimal getMinLoanAmount() {
        return minLoanAmount;
    }

    public void setMinLoanAmount(BigDecimal minLoanAmount) {
        this.minLoanAmount = minLoanAmount;
    }

    public BigDecimal getMaxLoanAmount() {
        return maxLoanAmount;
    }

    public void setMaxLoanAmount(BigDecimal maxLoanAmount) {
        this.maxLoanAmount = maxLoanAmount;
    }

    public Long getMinLoanTerm() {
        return minLoanTerm;
    }

    public void setMinLoanTerm(Long minLoanTerm) {
        this.minLoanTerm = minLoanTerm;
    }

    public Long getMaxLoanTerm() {
        return maxLoanTerm;
    }

    public void setMaxLoanTerm(Long maxLoanTerm) {
        this.maxLoanTerm = maxLoanTerm;
    }

    public Float getDayLoanRate() {
        return dayLoanRate;
    }

    public void setDayLoanRate(Float dayLoanRate) {
        this.dayLoanRate = dayLoanRate;
    }

    public String getProductSellPoint() {
        return productSellPoint;
    }

    public void setProductSellPoint(String productSellPoint) {
        this.productSellPoint = productSellPoint;
    }

    public String getProductH5Url() {
        return productH5Url;
    }

    public void setProductH5Url(String productH5Url) {
        this.productH5Url = productH5Url;
    }

    public String getProductIconUrl() {
        return productIconUrl;
    }

    public void setProductIconUrl(String productIconUrl) {
        this.productIconUrl = productIconUrl;
    }

    public JSONArray getApplyFlowList() {
        return applyFlowList;
    }

    public void setApplyFlowList(JSONArray applyFlowList) {
        this.applyFlowList = applyFlowList;
    }

    public String getApplyCondition() {
        return applyCondition;
    }

    public void setApplyCondition(String applyCondition) {
        this.applyCondition = applyCondition;
    }

    public String getAuditDetail() {
        return auditDetail;
    }

    public void setAuditDetail(String auditDetail) {
        this.auditDetail = auditDetail;
    }

    public String getProductIntroduce() {
        return productIntroduce;
    }

    public void setProductIntroduce(String productIntroduce) {
        this.productIntroduce = productIntroduce;
    }

    @Override
    public String toString() {
        return "NewProductDto{" +
                "productName='" + productName + '\'' +
                ", minLoanAmount=" + minLoanAmount +
                ", maxLoanAmount=" + maxLoanAmount +
                ", minLoanTerm=" + minLoanTerm +
                ", maxLoanTerm=" + maxLoanTerm +
                ", dayLoanRate=" + dayLoanRate +
                ", productSellPoint='" + productSellPoint + '\'' +
                ", productH5Url='" + productH5Url + '\'' +
                ", productIconUrl='" + productIconUrl + '\'' +
                ", loanDetailList=" + applyFlowList +
                ", applyCondition='" + applyCondition + '\'' +
                ", auditDetail='" + auditDetail + '\'' +
                ", productIntroduce='" + productIntroduce + '\'' +
                '}';
    }
}
